package com.job.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.job.controller.req.ReadMessageVO;
import com.job.pojo.Message;
import com.job.pojo.dto.UnreadDTO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.List;

@Mapper
public interface MessageMapper extends BaseMapper<Message> {

    public List<UnreadDTO> unreadCount(@Param("userId") Integer userId);

    public Message lastMessage(@Param("from_id") Integer fromId,@Param("to_id") Integer toId);

    public int read(ReadMessageVO messageVO);
}
